<template>
  <div id="wrap1">
    <h1>改装组合式API</h1>
    <p>{{ str }}</p>
    <p>{{ num }}</p>
    <img :src="src" alt="" />
    <p>{{ text }}</p>
    <input type="text" v-model="text">
  </div>
</template>
<script lang="ts">
export default {
  name: 'studemo3'
}
</script>
<script lang="ts" setup>
import { ref } from 'vue';
import imgSrc from '@/assets/images/7.png'
const str = ref<string>('你好世界')
const num = ref<number>(123)
const text = ref<string>('王小明')
const src = ref<string>(imgSrc)
</script>
<style lang="scss">
#wrap1 {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  text-align: center;
  margin-top: 20px;
  font-size: 18px;
  flex-direction: column;

  h1 {
    font-size: 50px;
    margin-bottom: 20px;
    color: rgb(243, 231, 233);
  }

  img {
    width: 500px;
    height: 300px;
  }
}
</style>
